import get from '@dfeidao/atom-web/global/get';
import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import { file_url, productid } from '../../atom/config';
import P01 from './p01';
import P02 from './p02';

export default async function a001(fd: IFeidaoAiBrowserComponent) {
	const user_no = get('user_no');
	set(fd, 'user_no', user_no);
	const res = await nodejs('common/zjc-000002/s001', { user_no, productid });
	// console.log(user_no, '------------', res);
	const filtt = {
		file_url,
		productid,
		res
	};

	render(fd, res[0], P01, 'P01', 'inner');
	render(fd, filtt, P02, 'P02', 'inner');
}
